<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=11"/>
<meta name="generator" content="Doxygen 1.9.2"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>轮回之牢: D:/Code/cProgram/CPP/Qt/TeamCurriculumDesign/Scenes/Objects/BaseObject.h 源文件</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">轮回之牢<span id="projectnumber">&#160;0.0.1</span>
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- 制作者 Doxygen 1.9.2 -->
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
var searchBox = new SearchBox("searchBox", "search",'搜索','.html');
/* @license-end */
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
/* @license magnet:?xt=urn:btih:d3d9a9a6595521f9666a5e94cc830dab83b65699&amp;dn=expat.txt MIT */
$(function() {
  initMenu('',true,false,'search.php','搜索');
  $(document).ready(function() { init_search(); });
});
/* @license-end */
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_80876d1476b72d92a9650b7ee3516e4c.html">TeamCurriculumDesign</a></li><li class="navelem"><a class="el" href="dir_1c44a597e253ab5e08d0f071e929694a.html">Scenes</a></li><li class="navelem"><a class="el" href="dir_8ed0aced26fae5e71a3f3de9fe02641e.html">Objects</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle"><div class="title">BaseObject.h</div></div>
</div><!--header-->
<div class="contents">
<div class="fragment"><div class="line"><a id="l00001" name="l00001"></a><span class="lineno">    1</span><span class="comment">//</span></div>
<div class="line"><a id="l00002" name="l00002"></a><span class="lineno">    2</span><span class="comment">// Created by lenovo on 2021/8/18.</span></div>
<div class="line"><a id="l00003" name="l00003"></a><span class="lineno">    3</span><span class="comment">//</span></div>
<div class="line"><a id="l00004" name="l00004"></a><span class="lineno">    4</span><span class="preprocessor">#pragma once</span></div>
<div class="line"><a id="l00005" name="l00005"></a><span class="lineno">    5</span><span class="preprocessor">#ifndef TEAMCURRICULUMDESIGN_BASEOBJECT_H</span></div>
<div class="line"><a id="l00006" name="l00006"></a><span class="lineno">    6</span><span class="preprocessor">#define TEAMCURRICULUMDESIGN_BASEOBJECT_H</span></div>
<div class="line"><a id="l00007" name="l00007"></a><span class="lineno">    7</span> </div>
<div class="line"><a id="l00008" name="l00008"></a><span class="lineno">    8</span> </div>
<div class="line"><a id="l00009" name="l00009"></a><span class="lineno">    9</span><span class="preprocessor">#include &quot;../../Utils/Math/Point.h&quot;</span></div>
<div class="line"><a id="l00010" name="l00010"></a><span class="lineno">   10</span><span class="preprocessor">#include &quot;../../Utils/Math/Vector.h&quot;</span></div>
<div class="line"><a id="l00011" name="l00011"></a><span class="lineno">   11</span><span class="preprocessor">#include &quot;../../Actors/Actor.h&quot;</span></div>
<div class="line"><a id="l00012" name="l00012"></a><span class="lineno">   12</span><span class="preprocessor">#include &quot;../../Utils/ClassFactory.h&quot;</span></div>
<div class="line"><a id="l00013" name="l00013"></a><span class="lineno">   13</span><span class="preprocessor">#include &lt;deque&gt;</span></div>
<div class="line"><a id="l00014" name="l00014"></a><span class="lineno">   14</span><span class="preprocessor">#include &lt;vector&gt;</span></div>
<div class="line"><a id="l00015" name="l00015"></a><span class="lineno">   15</span><span class="preprocessor">#include &lt;QObject&gt;</span></div>
<div class="line"><a id="l00016" name="l00016"></a><span class="lineno">   16</span> </div>
<div class="line"><a id="l00020" name="l00020"></a><span class="lineno"><a class="line" href="class_base_object.html">   20</a></span><span class="keyword">class </span><a class="code hl_class" href="class_base_object.html">BaseObject</a> {</div>
<div class="line"><a id="l00021" name="l00021"></a><span class="lineno">   21</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00026" name="l00026"></a><span class="lineno">   26</span>    <span class="keyword">const</span> <a class="code hl_class" href="class_point.html">Point</a> &amp;<a class="code hl_function" href="class_base_object.html#a7e176d1d960045fc200077eca43965e5">getPos</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00027" name="l00027"></a><span class="lineno">   27</span> </div>
<div class="line"><a id="l00032" name="l00032"></a><span class="lineno">   32</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_base_object.html#a85204616ebfb2ba858abde26f203d359">setPos</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_point.html">Point</a> &amp;pos_);</div>
<div class="line"><a id="l00033" name="l00033"></a><span class="lineno">   33</span> </div>
<div class="line"><a id="l00038" name="l00038"></a><span class="lineno">   38</span>    <span class="keywordtype">bool</span> <a class="code hl_function" href="class_base_object.html#a35b5ede527bbd73c579d8bdbfb90bee9">isFixed</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00039" name="l00039"></a><span class="lineno">   39</span> </div>
<div class="line"><a id="l00044" name="l00044"></a><span class="lineno">   44</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_base_object.html#a1baacb32f3f4e0481a46266fc3dfbbfc">setFixed</a>(<span class="keywordtype">bool</span> fixed_);</div>
<div class="line"><a id="l00045" name="l00045"></a><span class="lineno">   45</span> </div>
<div class="line"><a id="l00050" name="l00050"></a><span class="lineno">   50</span>    <span class="keywordtype">double</span> <a class="code hl_function" href="class_base_object.html#aa6b51f6eda42de15bbcf9b0c4fb1db51">getWidth</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00051" name="l00051"></a><span class="lineno">   51</span> </div>
<div class="line"><a id="l00056" name="l00056"></a><span class="lineno">   56</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_base_object.html#a3a47258298e3f5d0c63a516c11249d5e">setWidth</a>(<span class="keywordtype">double</span> width_);</div>
<div class="line"><a id="l00057" name="l00057"></a><span class="lineno">   57</span> </div>
<div class="line"><a id="l00062" name="l00062"></a><span class="lineno">   62</span>    <span class="keywordtype">double</span> <a class="code hl_function" href="class_base_object.html#a90bc7e758fa62359c6e0784415bf3095">getHeight</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00063" name="l00063"></a><span class="lineno">   63</span> </div>
<div class="line"><a id="l00068" name="l00068"></a><span class="lineno">   68</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_base_object.html#ad748705eb9028d3f81c76828d072ac6d">setHeight</a>(<span class="keywordtype">double</span> height_);</div>
<div class="line"><a id="l00069" name="l00069"></a><span class="lineno">   69</span> </div>
<div class="line"><a id="l00074" name="l00074"></a><span class="lineno">   74</span>    <span class="keywordtype">bool</span> <a class="code hl_function" href="class_base_object.html#ae27aa8d7730816c3b92844fa52e4a002">isCanGoThrough</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00075" name="l00075"></a><span class="lineno">   75</span> </div>
<div class="line"><a id="l00080" name="l00080"></a><span class="lineno">   80</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_base_object.html#a5d5f8d904178f4af4e3ded503d364f94">setCanGoThrough</a>(<span class="keywordtype">bool</span> canGoThrough);</div>
<div class="line"><a id="l00081" name="l00081"></a><span class="lineno">   81</span> </div>
<div class="line"><a id="l00086" name="l00086"></a><span class="lineno">   86</span>    <span class="keywordtype">bool</span> <a class="code hl_function" href="class_base_object.html#a11bb79be3c9bbe90709cbdcffa75d91e">isCanClimb</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00087" name="l00087"></a><span class="lineno">   87</span> </div>
<div class="line"><a id="l00092" name="l00092"></a><span class="lineno">   92</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_base_object.html#ad8782191bbcc265334390051b3efacbe">setCanClimb</a>(<span class="keywordtype">bool</span> canClimb);</div>
<div class="line"><a id="l00093" name="l00093"></a><span class="lineno">   93</span> </div>
<div class="line"><a id="l00098" name="l00098"></a><span class="lineno">   98</span>    <span class="keywordtype">double</span> <a class="code hl_function" href="class_base_object.html#a0b678f52f9f6e06c237a22715fa4331e">getMoveSpeed</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00099" name="l00099"></a><span class="lineno">   99</span> </div>
<div class="line"><a id="l00104" name="l00104"></a><span class="lineno">  104</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_base_object.html#a086ae2aee1a4243e68db93ff801018ca">setMoveSpeed</a>(<span class="keywordtype">double</span> moveSpeed);</div>
<div class="line"><a id="l00105" name="l00105"></a><span class="lineno">  105</span> </div>
<div class="line"><a id="l00111" name="l00111"></a><span class="lineno">  111</span>    <span class="keywordtype">bool</span> <a class="code hl_function" href="class_base_object.html#a39c190a92cdff0b0a0f02b0cb3ee7235">isActorOn</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_actor.html">Actor</a> &amp;actor) <span class="keyword">const</span>;</div>
<div class="line"><a id="l00112" name="l00112"></a><span class="lineno">  112</span> </div>
<div class="line"><a id="l00116" name="l00116"></a><span class="lineno">  116</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_base_object.html#ac243a7f83f8a6ac699ba521e9cc136b5">move</a>();</div>
<div class="line"><a id="l00117" name="l00117"></a><span class="lineno">  117</span> </div>
<div class="line"><a id="l00118" name="l00118"></a><span class="lineno">  118</span>    <span class="keyword">typedef</span> std::pair&lt;Point, int&gt; PointAndTime;</div>
<div class="line"><a id="l00119" name="l00119"></a><span class="lineno">  119</span> </div>
<div class="line"><a id="l00124" name="l00124"></a><span class="lineno">  124</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_base_object.html#a9c078a1ace9b004fb63a1ce73dd38474">setPath</a>(<span class="keyword">const</span> std::vector&lt;PointAndTime&gt; &amp;points);</div>
<div class="line"><a id="l00125" name="l00125"></a><span class="lineno">  125</span> </div>
<div class="line"><a id="l00130" name="l00130"></a><span class="lineno">  130</span>    <span class="keyword">const</span> std::string &amp;<a class="code hl_function" href="class_base_object.html#a9ad52a6ad68a6fa37707e4b95da209be">getId</a>() <span class="keyword">const</span>;</div>
<div class="line"><a id="l00131" name="l00131"></a><span class="lineno">  131</span> </div>
<div class="line"><a id="l00135" name="l00135"></a><span class="lineno">  135</span>    <a class="code hl_function" href="class_base_object.html#ad2f96304fd2dfe3bf450c7b63da6b470">BaseObject</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_base_object.html">BaseObject</a> &amp;);</div>
<div class="line"><a id="l00136" name="l00136"></a><span class="lineno">  136</span> </div>
<div class="line"><a id="l00137" name="l00137"></a><span class="lineno">  137</span><span class="keyword">protected</span>:</div>
<div class="line"><a id="l00141" name="l00141"></a><span class="lineno"><a class="line" href="class_base_object.html#a2fc71ba7e6b9c65e86ef8e44a44cc29f">  141</a></span>    std::string <a class="code hl_variable" href="class_base_object.html#a2fc71ba7e6b9c65e86ef8e44a44cc29f">id</a>;</div>
<div class="line"><a id="l00142" name="l00142"></a><span class="lineno">  142</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00147" name="l00147"></a><span class="lineno">  147</span>    <span class="keywordtype">void</span> <a class="code hl_function" href="class_base_object.html#a3450a7ef7956a57567ddcd45fab9f533">setId</a>(<span class="keyword">const</span> std::string &amp;id_);</div>
<div class="line"><a id="l00148" name="l00148"></a><span class="lineno">  148</span> </div>
<div class="line"><a id="l00149" name="l00149"></a><span class="lineno">  149</span><span class="keyword">protected</span>:</div>
<div class="line"><a id="l00153" name="l00153"></a><span class="lineno"><a class="line" href="class_base_object.html#a7ac499b5c6e520eeecdf8e9ae7beae6a">  153</a></span>    std::string <a class="code hl_variable" href="class_base_object.html#a7ac499b5c6e520eeecdf8e9ae7beae6a">className</a> = <span class="stringliteral">&quot;BaseObject&quot;</span>;</div>
<div class="line"><a id="l00157" name="l00157"></a><span class="lineno"><a class="line" href="class_base_object.html#ad2b90ee5793b658f19945f5ed8252bfe">  157</a></span>    <a class="code hl_class" href="class_point.html">Point</a> <a class="code hl_variable" href="class_base_object.html#ad2b90ee5793b658f19945f5ed8252bfe">pos</a>;<span class="comment">//物体位置</span></div>
<div class="line"><a id="l00161" name="l00161"></a><span class="lineno"><a class="line" href="class_base_object.html#acc5d2f48b26c6fef8d7bcf0c8194c2da">  161</a></span><span class="comment"></span>    <span class="keywordtype">bool</span> <a class="code hl_variable" href="class_base_object.html#acc5d2f48b26c6fef8d7bcf0c8194c2da">fixed</a>;</div>
<div class="line"><a id="l00165" name="l00165"></a><span class="lineno"><a class="line" href="class_base_object.html#a345ddf24dd642359b75ec9e8cbec24b2">  165</a></span>    <span class="keywordtype">double</span> <a class="code hl_variable" href="class_base_object.html#a345ddf24dd642359b75ec9e8cbec24b2">width</a>, height;</div>
<div class="line"><a id="l00169" name="l00169"></a><span class="lineno"><a class="line" href="class_base_object.html#ad3518dc3b4c964b4aa3417d72cdb2620">  169</a></span>    <span class="keywordtype">bool</span> <a class="code hl_variable" href="class_base_object.html#ad3518dc3b4c964b4aa3417d72cdb2620">can_go_through</a>;</div>
<div class="line"><a id="l00173" name="l00173"></a><span class="lineno"><a class="line" href="class_base_object.html#aed57694880d2f2f972012200f734f0d4">  173</a></span>    <span class="keywordtype">bool</span> <a class="code hl_variable" href="class_base_object.html#aed57694880d2f2f972012200f734f0d4">can_climb</a>;</div>
<div class="line"><a id="l00177" name="l00177"></a><span class="lineno"><a class="line" href="class_base_object.html#ae6a137a05e4cc941d0d208f7e43d3e55">  177</a></span>    std::deque&lt;PointAndTime&gt; <a class="code hl_variable" href="class_base_object.html#ae6a137a05e4cc941d0d208f7e43d3e55">path</a>;</div>
<div class="line"><a id="l00181" name="l00181"></a><span class="lineno"><a class="line" href="class_base_object.html#af0a7ee2cbc8d7cf908e511a50b412777">  181</a></span>    std::deque&lt;PointAndTime&gt;::iterator <a class="code hl_variable" href="class_base_object.html#af0a7ee2cbc8d7cf908e511a50b412777">pre</a>, next;</div>
<div class="line"><a id="l00185" name="l00185"></a><span class="lineno"><a class="line" href="class_base_object.html#acea9e6ec0461a1e4643367f600543be7">  185</a></span>    <span class="keywordtype">int</span> <a class="code hl_variable" href="class_base_object.html#acea9e6ec0461a1e4643367f600543be7">waiting_time_remain</a> = 0;</div>
<div class="line"><a id="l00189" name="l00189"></a><span class="lineno"><a class="line" href="class_base_object.html#acaad2d283f2c18ec6fa5ca51672971ea">  189</a></span>    <span class="keywordtype">double</span> <a class="code hl_variable" href="class_base_object.html#acaad2d283f2c18ec6fa5ca51672971ea">move_speed</a>{};</div>
<div class="line"><a id="l00190" name="l00190"></a><span class="lineno">  190</span> </div>
<div class="line"><a id="l00191" name="l00191"></a><span class="lineno">  191</span><span class="keyword">public</span>:</div>
<div class="line"><a id="l00192" name="l00192"></a><span class="lineno">  192</span>    <a class="code hl_function" href="class_base_object.html#ad2f96304fd2dfe3bf450c7b63da6b470">BaseObject</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_point.html">Point</a> &amp;<a class="code hl_variable" href="class_base_object.html#ad2b90ee5793b658f19945f5ed8252bfe">pos</a>, <span class="keywordtype">double</span> <a class="code hl_variable" href="class_base_object.html#a345ddf24dd642359b75ec9e8cbec24b2">width</a>, <span class="keywordtype">double</span> height, <span class="keywordtype">bool</span> <a class="code hl_variable" href="class_base_object.html#acc5d2f48b26c6fef8d7bcf0c8194c2da">fixed</a>, <span class="keywordtype">bool</span> <a class="code hl_variable" href="class_base_object.html#ad3518dc3b4c964b4aa3417d72cdb2620">can_go_through</a>, <span class="keywordtype">bool</span> <a class="code hl_variable" href="class_base_object.html#aed57694880d2f2f972012200f734f0d4">can_climb</a>);</div>
<div class="line"><a id="l00193" name="l00193"></a><span class="lineno">  193</span> </div>
<div class="line"><a id="l00198" name="l00198"></a><span class="lineno">  198</span>    <span class="keyword">virtual</span> <span class="keyword">const</span> std::string &amp;<a class="code hl_function" href="class_base_object.html#a9764d0d8a511d6d5f68a2d4acc811572">getClassName</a>();</div>
<div class="line"><a id="l00199" name="l00199"></a><span class="lineno">  199</span> </div>
<div class="line"><a id="l00200" name="l00200"></a><span class="lineno">  200</span>    <span class="keyword">virtual</span> <a class="code hl_class" href="class_base_object.html">~BaseObject</a>();</div>
<div class="line"><a id="l00201" name="l00201"></a><span class="lineno">  201</span> </div>
<div class="line"><a id="l00208" name="l00208"></a><span class="lineno"><a class="line" href="class_base_object.html#aea1a2bbace51c82664d5ce64b23d95c3">  208</a></span>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code hl_function" href="class_base_object.html#aea1a2bbace51c82664d5ce64b23d95c3">draw</a>(<span class="keyword">const</span> <a class="code hl_class" href="class_point.html">Point</a> &amp;show_pos, <span class="keywordtype">float</span> window_width, <span class="keywordtype">float</span> window_height) <span class="keyword">const</span> = 0;</div>
<div class="line"><a id="l00209" name="l00209"></a><span class="lineno">  209</span>};</div>
<div class="line"><a id="l00210" name="l00210"></a><span class="lineno">  210</span> </div>
<div class="line"><a id="l00211" name="l00211"></a><span class="lineno">  211</span><span class="preprocessor">#endif </span><span class="comment">//TEAMCURRICULUMDESIGN_BASEOBJECT_H</span></div>
<div class="ttc" id="aclass_actor_html"><div class="ttname"><a href="class_actor.html">Actor</a></div><div class="ttdoc">角色基类</div><div class="ttdef"><b>Definition:</b> Actor.h:18</div></div>
<div class="ttc" id="aclass_base_object_html"><div class="ttname"><a href="class_base_object.html">BaseObject</a></div><div class="ttdoc">场景内物体基类</div><div class="ttdef"><b>Definition:</b> BaseObject.h:20</div></div>
<div class="ttc" id="aclass_base_object_html_a086ae2aee1a4243e68db93ff801018ca"><div class="ttname"><a href="class_base_object.html#a086ae2aee1a4243e68db93ff801018ca">BaseObject::setMoveSpeed</a></div><div class="ttdeci">void setMoveSpeed(double moveSpeed)</div><div class="ttdoc">设置物体的移动速度</div><div class="ttdef"><b>Definition:</b> BaseObject.cpp:132</div></div>
<div class="ttc" id="aclass_base_object_html_a0b678f52f9f6e06c237a22715fa4331e"><div class="ttname"><a href="class_base_object.html#a0b678f52f9f6e06c237a22715fa4331e">BaseObject::getMoveSpeed</a></div><div class="ttdeci">double getMoveSpeed() const</div><div class="ttdoc">获取物体的移动速度</div><div class="ttdef"><b>Definition:</b> BaseObject.cpp:128</div></div>
<div class="ttc" id="aclass_base_object_html_a11bb79be3c9bbe90709cbdcffa75d91e"><div class="ttname"><a href="class_base_object.html#a11bb79be3c9bbe90709cbdcffa75d91e">BaseObject::isCanClimb</a></div><div class="ttdeci">bool isCanClimb() const</div><div class="ttdoc">获取物体是否可以攀爬，此属性必须在可以穿过时启用才有效</div><div class="ttdef"><b>Definition:</b> BaseObject.cpp:57</div></div>
<div class="ttc" id="aclass_base_object_html_a1baacb32f3f4e0481a46266fc3dfbbfc"><div class="ttname"><a href="class_base_object.html#a1baacb32f3f4e0481a46266fc3dfbbfc">BaseObject::setFixed</a></div><div class="ttdeci">void setFixed(bool fixed_)</div><div class="ttdoc">设置物体是否固定</div><div class="ttdef"><b>Definition:</b> BaseObject.cpp:29</div></div>
<div class="ttc" id="aclass_base_object_html_a2fc71ba7e6b9c65e86ef8e44a44cc29f"><div class="ttname"><a href="class_base_object.html#a2fc71ba7e6b9c65e86ef8e44a44cc29f">BaseObject::id</a></div><div class="ttdeci">std::string id</div><div class="ttdoc">物体id，全局唯一</div><div class="ttdef"><b>Definition:</b> BaseObject.h:141</div></div>
<div class="ttc" id="aclass_base_object_html_a3450a7ef7956a57567ddcd45fab9f533"><div class="ttname"><a href="class_base_object.html#a3450a7ef7956a57567ddcd45fab9f533">BaseObject::setId</a></div><div class="ttdeci">void setId(const std::string &amp;id_)</div><div class="ttdoc">设置物体id，警告，必须保证全局唯一性</div><div class="ttdef"><b>Definition:</b> BaseObject.cpp:140</div></div>
<div class="ttc" id="aclass_base_object_html_a345ddf24dd642359b75ec9e8cbec24b2"><div class="ttname"><a href="class_base_object.html#a345ddf24dd642359b75ec9e8cbec24b2">BaseObject::width</a></div><div class="ttdeci">double width</div><div class="ttdoc">物体长宽</div><div class="ttdef"><b>Definition:</b> BaseObject.h:165</div></div>
<div class="ttc" id="aclass_base_object_html_a35b5ede527bbd73c579d8bdbfb90bee9"><div class="ttname"><a href="class_base_object.html#a35b5ede527bbd73c579d8bdbfb90bee9">BaseObject::isFixed</a></div><div class="ttdeci">bool isFixed() const</div><div class="ttdoc">获取物体是否固定</div><div class="ttdef"><b>Definition:</b> BaseObject.cpp:25</div></div>
<div class="ttc" id="aclass_base_object_html_a39c190a92cdff0b0a0f02b0cb3ee7235"><div class="ttname"><a href="class_base_object.html#a39c190a92cdff0b0a0f02b0cb3ee7235">BaseObject::isActorOn</a></div><div class="ttdeci">bool isActorOn(const Actor &amp;actor) const</div><div class="ttdoc">角色是否站在物体上方</div><div class="ttdef"><b>Definition:</b> BaseObject.cpp:65</div></div>
<div class="ttc" id="aclass_base_object_html_a3a47258298e3f5d0c63a516c11249d5e"><div class="ttname"><a href="class_base_object.html#a3a47258298e3f5d0c63a516c11249d5e">BaseObject::setWidth</a></div><div class="ttdeci">void setWidth(double width_)</div><div class="ttdoc">设置物体宽度，单位：像素</div><div class="ttdef"><b>Definition:</b> BaseObject.cpp:37</div></div>
<div class="ttc" id="aclass_base_object_html_a5d5f8d904178f4af4e3ded503d364f94"><div class="ttname"><a href="class_base_object.html#a5d5f8d904178f4af4e3ded503d364f94">BaseObject::setCanGoThrough</a></div><div class="ttdeci">void setCanGoThrough(bool canGoThrough)</div><div class="ttdoc">设置物体是否可以穿过</div><div class="ttdef"><b>Definition:</b> BaseObject.cpp:53</div></div>
<div class="ttc" id="aclass_base_object_html_a7ac499b5c6e520eeecdf8e9ae7beae6a"><div class="ttname"><a href="class_base_object.html#a7ac499b5c6e520eeecdf8e9ae7beae6a">BaseObject::className</a></div><div class="ttdeci">std::string className</div><div class="ttdoc">类名</div><div class="ttdef"><b>Definition:</b> BaseObject.h:153</div></div>
<div class="ttc" id="aclass_base_object_html_a7e176d1d960045fc200077eca43965e5"><div class="ttname"><a href="class_base_object.html#a7e176d1d960045fc200077eca43965e5">BaseObject::getPos</a></div><div class="ttdeci">const Point &amp; getPos() const</div><div class="ttdoc">获取物体位置</div><div class="ttdef"><b>Definition:</b> BaseObject.cpp:17</div></div>
<div class="ttc" id="aclass_base_object_html_a85204616ebfb2ba858abde26f203d359"><div class="ttname"><a href="class_base_object.html#a85204616ebfb2ba858abde26f203d359">BaseObject::setPos</a></div><div class="ttdeci">void setPos(const Point &amp;pos_)</div><div class="ttdef"><b>Definition:</b> BaseObject.cpp:21</div></div>
<div class="ttc" id="aclass_base_object_html_a90bc7e758fa62359c6e0784415bf3095"><div class="ttname"><a href="class_base_object.html#a90bc7e758fa62359c6e0784415bf3095">BaseObject::getHeight</a></div><div class="ttdeci">double getHeight() const</div><div class="ttdoc">获取物体高度，单位：像素</div><div class="ttdef"><b>Definition:</b> BaseObject.cpp:41</div></div>
<div class="ttc" id="aclass_base_object_html_a9764d0d8a511d6d5f68a2d4acc811572"><div class="ttname"><a href="class_base_object.html#a9764d0d8a511d6d5f68a2d4acc811572">BaseObject::getClassName</a></div><div class="ttdeci">virtual const std::string &amp; getClassName()</div><div class="ttdoc">获取类名</div><div class="ttdef"><b>Definition:</b> BaseObject.cpp:151</div></div>
<div class="ttc" id="aclass_base_object_html_a9ad52a6ad68a6fa37707e4b95da209be"><div class="ttname"><a href="class_base_object.html#a9ad52a6ad68a6fa37707e4b95da209be">BaseObject::getId</a></div><div class="ttdeci">const std::string &amp; getId() const</div><div class="ttdoc">获取物体id，方便场景管理</div><div class="ttdef"><b>Definition:</b> BaseObject.cpp:136</div></div>
<div class="ttc" id="aclass_base_object_html_a9c078a1ace9b004fb63a1ce73dd38474"><div class="ttname"><a href="class_base_object.html#a9c078a1ace9b004fb63a1ce73dd38474">BaseObject::setPath</a></div><div class="ttdeci">void setPath(const std::vector&lt; PointAndTime &gt; &amp;points)</div><div class="ttdoc">设置路径，具有移动功能的类必须调用此函数</div><div class="ttdef"><b>Definition:</b> BaseObject.cpp:117</div></div>
<div class="ttc" id="aclass_base_object_html_aa6b51f6eda42de15bbcf9b0c4fb1db51"><div class="ttname"><a href="class_base_object.html#aa6b51f6eda42de15bbcf9b0c4fb1db51">BaseObject::getWidth</a></div><div class="ttdeci">double getWidth() const</div><div class="ttdoc">获取物体宽度，单位:像素</div><div class="ttdef"><b>Definition:</b> BaseObject.cpp:33</div></div>
<div class="ttc" id="aclass_base_object_html_ac243a7f83f8a6ac699ba521e9cc136b5"><div class="ttname"><a href="class_base_object.html#ac243a7f83f8a6ac699ba521e9cc136b5">BaseObject::move</a></div><div class="ttdeci">void move()</div><div class="ttdoc">移动函数，承载角色的逻辑由场景执行</div><div class="ttdef"><b>Definition:</b> BaseObject.cpp:84</div></div>
<div class="ttc" id="aclass_base_object_html_acaad2d283f2c18ec6fa5ca51672971ea"><div class="ttname"><a href="class_base_object.html#acaad2d283f2c18ec6fa5ca51672971ea">BaseObject::move_speed</a></div><div class="ttdeci">double move_speed</div><div class="ttdoc">移动的速度，每帧恒定，单位：像素/帧</div><div class="ttdef"><b>Definition:</b> BaseObject.h:189</div></div>
<div class="ttc" id="aclass_base_object_html_acc5d2f48b26c6fef8d7bcf0c8194c2da"><div class="ttname"><a href="class_base_object.html#acc5d2f48b26c6fef8d7bcf0c8194c2da">BaseObject::fixed</a></div><div class="ttdeci">bool fixed</div><div class="ttdoc">是否固定物</div><div class="ttdef"><b>Definition:</b> BaseObject.h:161</div></div>
<div class="ttc" id="aclass_base_object_html_acea9e6ec0461a1e4643367f600543be7"><div class="ttname"><a href="class_base_object.html#acea9e6ec0461a1e4643367f600543be7">BaseObject::waiting_time_remain</a></div><div class="ttdeci">int waiting_time_remain</div><div class="ttdoc">移动路径点等待时长，单位：帧</div><div class="ttdef"><b>Definition:</b> BaseObject.h:185</div></div>
<div class="ttc" id="aclass_base_object_html_ad2b90ee5793b658f19945f5ed8252bfe"><div class="ttname"><a href="class_base_object.html#ad2b90ee5793b658f19945f5ed8252bfe">BaseObject::pos</a></div><div class="ttdeci">Point pos</div><div class="ttdoc">物体位置</div><div class="ttdef"><b>Definition:</b> BaseObject.h:157</div></div>
<div class="ttc" id="aclass_base_object_html_ad2f96304fd2dfe3bf450c7b63da6b470"><div class="ttname"><a href="class_base_object.html#ad2f96304fd2dfe3bf450c7b63da6b470">BaseObject::BaseObject</a></div><div class="ttdeci">BaseObject(const BaseObject &amp;)</div><div class="ttdoc">拷贝构造，拷贝的新对象会拥有不同id</div><div class="ttdef"><b>Definition:</b> BaseObject.cpp:144</div></div>
<div class="ttc" id="aclass_base_object_html_ad3518dc3b4c964b4aa3417d72cdb2620"><div class="ttname"><a href="class_base_object.html#ad3518dc3b4c964b4aa3417d72cdb2620">BaseObject::can_go_through</a></div><div class="ttdeci">bool can_go_through</div><div class="ttdoc">是否可以穿过</div><div class="ttdef"><b>Definition:</b> BaseObject.h:169</div></div>
<div class="ttc" id="aclass_base_object_html_ad748705eb9028d3f81c76828d072ac6d"><div class="ttname"><a href="class_base_object.html#ad748705eb9028d3f81c76828d072ac6d">BaseObject::setHeight</a></div><div class="ttdeci">void setHeight(double height_)</div><div class="ttdoc">设置物体高度，单位：像素</div><div class="ttdef"><b>Definition:</b> BaseObject.cpp:45</div></div>
<div class="ttc" id="aclass_base_object_html_ad8782191bbcc265334390051b3efacbe"><div class="ttname"><a href="class_base_object.html#ad8782191bbcc265334390051b3efacbe">BaseObject::setCanClimb</a></div><div class="ttdeci">void setCanClimb(bool canClimb)</div><div class="ttdoc">设置物体是否可以攀爬，此属性必须在可以穿过时启用才有效</div><div class="ttdef"><b>Definition:</b> BaseObject.cpp:61</div></div>
<div class="ttc" id="aclass_base_object_html_ae27aa8d7730816c3b92844fa52e4a002"><div class="ttname"><a href="class_base_object.html#ae27aa8d7730816c3b92844fa52e4a002">BaseObject::isCanGoThrough</a></div><div class="ttdeci">bool isCanGoThrough() const</div><div class="ttdoc">获取物体是否可以穿过</div><div class="ttdef"><b>Definition:</b> BaseObject.cpp:49</div></div>
<div class="ttc" id="aclass_base_object_html_ae6a137a05e4cc941d0d208f7e43d3e55"><div class="ttname"><a href="class_base_object.html#ae6a137a05e4cc941d0d208f7e43d3e55">BaseObject::path</a></div><div class="ttdeci">std::deque&lt; PointAndTime &gt; path</div><div class="ttdoc">可移动物体的移动路径</div><div class="ttdef"><b>Definition:</b> BaseObject.h:177</div></div>
<div class="ttc" id="aclass_base_object_html_aea1a2bbace51c82664d5ce64b23d95c3"><div class="ttname"><a href="class_base_object.html#aea1a2bbace51c82664d5ce64b23d95c3">BaseObject::draw</a></div><div class="ttdeci">virtual void draw(const Point &amp;show_pos, float window_width, float window_height) const =0</div><div class="ttdoc">供前端使用的绘制函数</div></div>
<div class="ttc" id="aclass_base_object_html_aed57694880d2f2f972012200f734f0d4"><div class="ttname"><a href="class_base_object.html#aed57694880d2f2f972012200f734f0d4">BaseObject::can_climb</a></div><div class="ttdeci">bool can_climb</div><div class="ttdoc">是否可以攀爬</div><div class="ttdef"><b>Definition:</b> BaseObject.h:173</div></div>
<div class="ttc" id="aclass_base_object_html_af0a7ee2cbc8d7cf908e511a50b412777"><div class="ttname"><a href="class_base_object.html#af0a7ee2cbc8d7cf908e511a50b412777">BaseObject::pre</a></div><div class="ttdeci">std::deque&lt; PointAndTime &gt;::iterator pre</div><div class="ttdoc">当前正在移动的前一个位置和下一个位置,方便move函数使用</div><div class="ttdef"><b>Definition:</b> BaseObject.h:181</div></div>
<div class="ttc" id="aclass_point_html"><div class="ttname"><a href="class_point.html">Point</a></div><div class="ttdoc">二维点</div><div class="ttdef"><b>Definition:</b> Point.h:18</div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
制作者&#160;<a href="https://www.doxygen.org/index.html"><img class="footer" src="doxygen.svg" width="104" height="31" alt="doxygen"/></a> 1.9.2
</small></address>
</body>
</html>
